package com.example.work;

import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.example.work.entity.DbCheckCategory;
import com.example.work.mapper.DbCheckCategoryMapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Date;
import java.util.List;

/**
 * @author: javaLiuwb
 * @date: 2024-11-25 17:59
 * @description:
 */
@SpringBootTest
public class test {

    @Autowired
    private DbCheckCategoryMapper dbCheckCategory;

    @Test
    public void testDate() {
        Date date = new Date();
        System.out.println(date);
    }

    @Test
    public void testSelect() {
        System.out.println(("----- selectAll method test ------"));
        List<DbCheckCategory> dbCheckCategoryList = dbCheckCategory.selectList(null);
       // Assert.isTrue(5 == dbCheckCategoryList.size(), "");
        dbCheckCategoryList.forEach(System.out::println);
    }

    @Test
    public void testSave() {
        System.out.println(("----- save method test ------"));
        DbCheckCategory dbCheckCategory1=new DbCheckCategory();
        dbCheckCategory1.setName("ceshi111");
        dbCheckCategory1.setCreateBy("liuwb");
        dbCheckCategory.insert(dbCheckCategory1);

    }


}